package org.jeecg.modules.flowable.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.flowable.dto.FlowTaskOperationDTO;
import org.jeecg.modules.flowable.entity.FlowOperationInfo;
import org.jeecg.modules.flowable.enums.TaskOperationTypeEnum;
import org.jeecg.modules.flowable.mapper.FlowOperationInfoMapper;
import org.jeecg.modules.flowable.service.FlowOperationInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.List;

@Slf4j
@Service
public class FlowOperationInfoServiceImpl extends ServiceImpl<FlowOperationInfoMapper, FlowOperationInfo> implements FlowOperationInfoService {

    @Resource
    private FlowOperationInfoMapper flowOperationInfoMapper;

    @Override
    public List<FlowOperationInfo> searchsByInstanceId(String instanceId) {
        LambdaQueryWrapper<FlowOperationInfo> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(FlowOperationInfo::getProcessInstanceId, instanceId);
        return flowOperationInfoMapper.selectList(queryWrapper);
    }
}
